package com.taofengsdk.video.json;

import com.google.gson.Gson;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by tao on 17-3-16.
 */

public class ResponseEntity {

    public static Object parseJson(String jsonContent, Class<?> clazz) {
        Object obj = null;

        try {
            JSONObject result = new JSONObject(jsonContent);
            if (result != null) {
                Gson gson = new Gson();
                obj = gson.fromJson(result.toString(), clazz);
            }
        } catch (JSONException e) {
            e.printStackTrace();
        }

        return obj;
    }
}
